package com.originskyseed.platform.pk.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.pk.model.PkRule;

/**
 * pk规则表Service接口类（OSI_PK_RULE）
 *
 * @author WuZhuoXi
 */
public interface IPkRuleService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByIds(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(PkRule record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(PkRule record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(PkRule record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(PkRule record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public PkRule selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<PkRule> selectList(PkRule record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<PkRule> selectListByPage(Map<String, Object> params, BasePage<PkRule> page) throws Exception;

	/**
	 * 发起PK页面规则列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<PkRule> selectPkRuleListByPage(Map<String, Object> params, BasePage<PkRule> page) throws Exception;

	/**
	 * 批量禁用启用
	 *
	 * @param ids
	 * @param state
	 * @param updateTime
	 * @return
	 * @throws Exception
	 */
	public int updateBatchStateByIds(List<String> ids, Integer state, Date updateTime) throws Exception;
}
